import axios from "axios"

export default {
    async getByOrderId(id) {
        const resp = await axios.get("/api/order/" + id);
        return resp.data;
    },
    async getOrder(id) {
        const resp = await axios.get("/api/petowners/getOrder/" + id);
        return resp.data;
    },
    async getOrderUpdate(order) {
        await axios.put("/api/order/" + order._id, order)
    },
    async deleteOrder(id) {
        await axios.delete("/api/order/" + id);
    },
    async addOrder(order) {
        const resp = await axios.post("/api/order/add", order);
        return resp.data;
    }
}